package com.zhou.core.scheduler.job;

import com.zhou.core.esb.common.Const;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * Created by zhouyongjun on 2020/8/26
 */
public abstract class AbstractJob implements Job {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        Object[] objs = (Object[]) context.getJobDetail().getJobDataMap().get(Const.SCHEDULER_EXTRA_JOB_OBJECTS);
        execute(context,objs);
    }
    public abstract  void  execute(JobExecutionContext context,Object... params)throws JobExecutionException;

}
